Using statistical language models for contextual lookup

ABSTRACT

Using a statistical language model to make information related to a word or other content of interest available is disclosed. An indication that a word or phrase is of interest is received. A contextual meta-information associated with the word or phrase of interest as used in context is used to make information related to the word or phrase of interest available, for example, by forming a more precise query and/or filtering search results based on the contextual meta-information.

BACKGROUND OF THE INVENTION

Part of speech tagging is the process of tagging a word as corresponding to a particular part of speech based on its definition and/or context, e.g., adjacent and related words in a phrase, sentence, or paragraph. Techniques are known to process a corpus (body) of annotated text to generate a model that can be used to determine a statistical likelihood that a word in a given context in a non-annotated text corresponds to a particular part of speech. Similar techniques have been used to identify a word or words as corresponding to a named entity (e.g., “Apple” the company as opposed to “apple” the fruit) and/or to distinguish between one sense of a word and another (e.g., “play” as used to refer to a dramatic work as opposed to children's “play”).

Techniques to provide access to information about a selected word or phrase are known. Examples include automatically performing or providing a selectable option to perform a search for related information, for example from a database or the Internet, upon selection of a word or phrase, for example in the context of a word processing or other application document, a webpage, etc. Typically, the selected word(s) is/are used as keywords to perform a lookup or other search.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the invention are disclosed in the following detailed description and the accompanying drawings.

FIG. 1 is a flow diagram illustrating an embodiment of a process of performing a contextual search.

FIG. 2 is a block diagram illustrating an embodiment of a system configured to perform a contextual search.

FIG. 3 is a flow diagram illustrating an embodiment of a process to configure a system to perform part of speech tagging.

FIG. 4 is a flow diagram illustrating an embodiment of a process to make available information related to a word or phrase of interest.

FIG. 5 is a flow diagram illustrating an embodiment of a process to obtain and display information related to a word or phrase of interest.

FIG. 6 is a flow diagram illustrating an embodiment of a process to obtain information related to a word or phrase of interest.

FIG. 7 is a flow diagram illustrating an embodiment of a process to obtain information related to a word or phrase of interest.

FIG. 8 is a block diagram illustrating an embodiment of a system for providing related information.

DETAILED DESCRIPTION

The invention can be implemented in numerous ways, including as a process; an apparatus; a system; a composition of matter; a computer program product embodied on a computer readable storage medium; and/or a processor, such as a processor configured to execute instructions stored on and/or provided by a memory coupled to the processor. In this specification, these implementations, or any other form that the invention may take, may be referred to as techniques. In general, the order of the steps of disclosed processes may be altered within the scope of the invention. Unless stated otherwise, a component such as a processor or a memory described as being configured to perform a task may be implemented as a general component that is temporarily configured to perform the task at a given time or a specific component that is manufactured to perform the task. As used herein, the term ‘processor’ refers to one or more devices, circuits, and/or processing cores configured to process data, such as computer program instructions.

A detailed description of one or more embodiments of the invention is provided below along with accompanying figures that illustrate the principles of the invention. The invention is described in connection with such embodiments, but the invention is not limited to any embodiment. The scope of the invention is limited only by the claims and the invention encompasses numerous alternatives, modifications and equivalents. Numerous specific details are set forth in the following description in order to provide a thorough understanding of the invention. These details are provided for the purpose of example and the invention may be practiced according to the claims without some or all of these specific details. For the purpose of clarity, technical material that is known in the technical fields related to the invention has not been described in detail so that the invention is not unnecessarily obscured.

Using part-of-speech tagging and/or other information about a word or phrase determined at least in part based on a context in which the word or phrase is used and/or occurs to perform a contextual search for information associated with the word or phrase is disclosed. In various embodiments, upon typing, selection, etc. of a word or phrase, information about how the word or phrase is used in context, for example in a sentence or other context, is used to determine information about the word or phrase as used in that particular context. Examples include determining a part of speech of the word or phrase from a manner in which the word or phrase is used in a sentence, such as a location of the word or phrase in the sentence; determining the word or phrase comprises a named entity, for example based on capitalization, usage, etc.; and a sense in which a word or phrase that has more than one meaning is used in that particular context. In some embodiments, a statistical language model is used to determine a probability or other likelihood that the word or phrase comprises a particular part of speech, comprises a named entity, has a particular sense or meaning as used, etc. The information is used in various embodiments to retrieve information about the word or phrase, for example from a local database; a proprietary or other local or external data source, such as an online store of information; or other sources. In some embodiments, the contextually-determined information is used to search for related information, for example by forming a more specific search than merely using the word or words comprising the phrase as keywords. In some embodiments, the contextually-determined information is used to filter results of a search for related information, for example one in which the word or words comprising the phrase are used as keywords.

FIG. 1 is a flow diagram illustrating an embodiment of a process of performing a contextual search. In the example shown, an indication of interest in one or more words is received (102). Examples include, without limitation, a user typing or otherwise entering the words in the context of a word processing or other application document; mouse-over, electronic highlighting, and/or other electronic selection of the word or words, for example in the context of a webpage, a word processing document, or another application or other electronic document; and identification and/or recognition of the word or words as comprising a word or phrase about which further information is or may be available and/or of interest. Contextual information, such as part-of-speech or other meta-information tags, are used to make related information available (104). In some embodiments, part of speech or other context information is determined dynamically, in real time, for example upon entry or selection of the word or words. The word or words of interest along with associated words comprising a context in which the word or words of interest are used, such as words comprising a sentence in which the word or words of interest are used, as processed along with the word or words of interest to determine contextual information about how the word or words are used, such as part of speech, status as a named entity or not, and word sense. In some information, preexisting meta-information, such as a previously and/or third party generated part of speech of other tag, is used. Examples of using contextually-determined information to make related information available include, without limitation, formulating a search based at least in part on the contextually-determined information, in addition to the word or words of interest themselves, and using contextually-determined information to filter search results.

FIG. 2 is a block diagram illustrating an embodiment of a system configured to perform a contextual search. In the example shown, the system 202, comprises one or more applications 204 running on an application framework 206 running on an operating system 208. Examples of system 202 include, without limitation, a computer, a television, a “smart” phone or other mobile device, etc. In various embodiments, the system 202 includes a processor, a memory and/or other storage, a display, and one or more input devices, interfaces, and/or peripheral devices. In the example shown, system 202 includes an input device 210, such as hardware or software (e.g., touchscreen) keyboard and/or a mouse of other pointing/selection device, connected to provide input signals, such as key press (e.g., up and/or down) events and/or selection events, via an input device driver 212 to operating system 208. Operating system 208 provides keystroke and/or other input event information to application framework 206, which in turn makes them available as applicable to applications 204. For example, as text is entered and/or selected, operating system 208 in various embodiments provides related event information to application framework 206, which makes the information available, in this example, to an application 204 with which a document in which the event occurred is associated. Application framework 206 makes available to applications 204, via a low level API, statistical part-of-speech tagging and/or other contextual analysis and/or tagging services. For example, as words are typed application framework 206 receives and processes associated keystroke events to determine word, sentence, and/or other boundaries, and uses typed words along with additional words, in the same sentence for example, to determine based on context and using a statistical language model 214 a part-of-speech of a typed word or phrase, named entity status, word sense, etc. In some embodiments, metadata tags and/or other data structures are used to store and associated with corresponding text part-of-speech and/or other metadata determined about words and phrases based at least in part on contextual information, such as adjacent words comprising the same sentence, and/or other features such as prefixes and suffixes, capitalization, etc.

Application framework 206 makes available to applications 204, via a higher level API, the ability to retrieve information about a word or phrase of interest. In the example shown, additional information about a selected or otherwise identified and/or determined word or phrase may be retrieved from a local database of additional information 216 and/or by searching or otherwise obtaining information from a remote source, e.g., via network communication sent via network interface 218. In various embodiments, previously and/or dynamically determined meta-information determined based at least in part on contextual information such a location within a sentence and/or relative to nearby words and phrases, the meaning and use of nearby words and phrases, etc. are or may be used to retrieve information related to a word or phrase of interest. For example, in some embodiments, information such as statistically determined part-of-speech (“run” as the verb “to run” as opposed to a noun, as in “dog run” or “production run”, or the noun “running” referring to the sport), status as a named entity or not (“apple” the fruit versus “Apple” as in Apple, Inc. the company), and/or word sense (e.g., “diner” as in a person eating, as in a restaurant, as opposed to a “diner” type restaurant or café) are used to form a more specific and/or targeted search. In some embodiments, meta-information is or may be used to filter search results, for example to filter out results not relevant to the word or phrase of interest as used and/or to assign or modify relevance scores of respective results based on whether or to what extent they relate to the word or phrase of interest as used in context. In various embodiments, results are displayed and/or made available to be displayed via a display device, not shown in FIG. 2, such as an LCD or other screen.

FIG. 3 is a flow diagram illustrating an embodiment of a process to configure a system to perform part of speech tagging. In the example shown, an annotated corpus (or multiple corpora) of text is ingested and analyzed (302). The annotation identifies, for example, part of speech and/or other features of words and phrases as used in text comprising the corpus. In some embodiments, a commercially available corpus is used. In some embodiments, the commercially available corpus is supplemented by additional content annotated manually. For example, content from less traditional sources such as blog entries, online comments, and status updates or other text posted via online social networks are ingested and annotated, and then included in an augmented corpus of annotated (for example, part of speech tagged) text. The corpus is analyzed to build a statistical language model (304). The model is used in various embodiments, for example, to determine for a word or phrase as used in an arbitrary sentence, given knowledge of where the word or phrase occurs in a sentence, for example, and/or other features of the word or phrase, a statistical likelihood that the word or phrase corresponds to a particular part of speech, or comprises a named entity, etc. A system, such as a computer, is configured to store the statistical model and to use the model to analyze and tag text as entered (306).

FIG. 4 is a flow diagram illustrating an embodiment of a process to make available information related to a word or phrase of interest. In the example shown, entered text is received (402). Examples include text entered by a user, using a keyboard or other input device, in the context of a word processing or other application document. Statistical part-of-speech tagging is performed (404). In various embodiments, part-of-speech tagging is performed in part by parsing text as entered to identify words and sentence boundaries, and using contextual information (e.g., location in sentence) and/or other features (e.g., capitalization, prefixes and/or suffixes, etc.) to determine a statistical probability and/or other likelihood that an entered word or phrase as used is associated with a particular part of speech, comprises or does not comprise a named entity, is used in a particular sense, etc. A selection or other indication of one or more words of interest, such as a word or phrase, is received (406). Examples include, without limitation, a mouse rollover, double click, click and drag, or any other selection action. In some embodiments, related information may be determined, linked, retrieved, associated with a word or phrase, and/or other made available, without receiving an explicit selection or other explicit indication that the word or phrase is currently of interest. Contextual information, such as part-of-speech or other meta-information determined based at least in part on a context in which a word or phrase is used, are used to determined related information to make available (408).

FIG. 5 is a flow diagram illustrating an embodiment of a process to obtain and display information related to a word or phrase of interest. In various embodiments, the process of FIG. 5 is implemented by application or other code, such as application code 204 of FIG. 2. In the example shown in FIG. 5, a selection of one or more words is received (502). Additional words or other text to be included as context are determined (504). In some embodiments, for example word, phrase, sentence, paragraph, and/or other boundaries are determined and/or used to select additional words to be included as context. The selected word or phrase and the additional context are provided via an API call, for example to an application framework such as framework 206 of FIG. 2 and/or a call to a remote or other server, e.g., via a network or other communication (506). Related information is received and displayed, e.g., via a display device in the context of a word processing or other application document in which the selection of the word or phrase of interest was made (508).

FIG. 6 is a flow diagram illustrating an embodiment of a process to obtain information related to a word or phrase of interest. In the example shown, contextual information is used to form a query informed at least in part by contextual information, such as the way in which a word or phrase of interest is used, its location within a sentence or other unit, nearby words and phrases, etc. In a body of text, words or phrases that may be susceptible to more than one meaning are identified (602). In various embodiments, the identification is performed in connection with one or more of an analysis of text as entered; an analysis of a body of text as received in bulk, such as a retrieved web page or upon receipt or opening of an electronic document; or an analysis of a word or phrase upon selection. In some embodiments, step 602 is omitted. For each word or phrase susceptible to more than one meaning, part of speech and/or other tags or meta-information and/or other contextual or contextually-determined information are used to resolve the ambiguity, e.g., to determine a sense in which the word or phrase is used in context (604). A query specific in some respect to the determined meaning and/or manner in which the word or phrase is formed (606). For example, in various embodiments nearby words or phrases may be included as qualifiers in the query, or additional words added to the query to increase the likelihood that results will be relevant to the word or phrase as used in context.

FIG. 7 is a flow diagram illustrating an embodiment of a process to obtain information related to a word or phrase of interest. In the example shown, contextual information is used to filter or otherwise post-process search results obtained initially by performing a keyword search using a word or phrase of interest, for example. As in FIG. 7, words or phrases that may be susceptible to more than one meaning are identified (702). For each word or phrase susceptible to more than one meaning, part of speech and/or other tags or meta-information and/or other contextual or contextually-determined information are used to resolve the ambiguity, e.g., to determine a sense in which the word or phrase is used in context (704). A query to retrieve information related to the word or phrase of interest is formed and submitted, and received results are filtered or otherwise post-processed based at least in part on contextual information, such as part of speech or other tags or meta-information (706). For example, results determined to be related to a sense of a word or phrase other than a sense in which the word or phrase has been determined to have been used in the relevant context may be filtered out and/or assigned a lower score and/or ranking.

In various embodiments, pre-processing (query formation) as described in connection with FIG. 6 and post-processing (filtering, scoring/ranking) as described in connection with FIG. 7 are and/or may be applied together, and/or one or the other of them depending on the word or phrase of interest, the context in which it is used, the information sources to be accessed, and/or the results received, etc.

FIG. 8 is a block diagram illustrating an embodiment of a system for providing related information. In the example shown, systems such as mobile device 802 and client computer system 804 connect via a network 806, such as the Internet, to a remote server 808. Application code or other instructions executed on the user device (802, 804) receive via a user input or otherwise a selection or other identification of text comprising a word or phrase of interest. Other adjacent words and/or other contextual and/or contextually determined information, such as part of speech or other tags and/or meta-information, are sent, along with the word or phrase of interest, to the server 808 via network 806. Server 808 uses the contextual information to retrieve, e.g., via a query sent via network 806 to one or more sources of related information 810, such as a search engine, etc., information related to the word or phrase of interest. In various embodiments, server 808 is configured to implement the process of FIG. 6 (for example, query formation informed by contextual information), the process of FIG. 7 (for example, search results filtered, scored, ranked, and/or otherwise post-processed in light of contextual information), and/or a hybrid and/or other combination of both.

Although the foregoing embodiments have been described in some detail for purposes of clarity of understanding, the invention is not limited to the details provided. There are many alternative ways of implementing the invention. The disclosed embodiments are illustrative and not restrictive. 

1. A method of making related information available, comprising: receiving an indication that a word or phrase is of interest; using a contextual meta-information associated with the word or phrase of interest as used in context to make available information related to the word or phrase of interest.
 2. The method of claim 1, wherein the contextual meta-information comprises a part of speech or other metadata tag associated with the word or phrase.
 3. The method of claim 1, wherein the contextual meta-information comprises an indication of a named entity status of the word or phrase of interest.
 4. The method of claim 1, wherein the contextual meta-information comprises an metadata indicating a sense in which the word or phrase of interest is used.
 5. The method of claim 1, further comprising generating the contextual meta-information.
 6. The method of claim 5, wherein generating the contextual meta-information comprises analyzing the word or phrase of interest and one or more additional words that occur in a same context as the word or phrase of interest.
 7. The method of claim 5, wherein generating the contextual meta-information comprises using a statistical language model to determine one or more of a part of speech, a named entity status, and a word sense of the word or phrase of interest as used.
 8. The method of claim 1, wherein receiving an indication that a word or phrase is of interest includes receiving an indication that the word or phrase has been selected electronically in the context of a word processing or other electronic application document.
 9. The method of claim 1, wherein the contextual meta-information is used, in addition to the word or phrase of interest, to form a query specific to the manner in which the word or phrase of interest is used in context.
 10. The method of claim 1, wherein the contextual meta-information is used to post-process search results received in response to a query associated with the word or phrase of interest.
 11. The method of claim 10, wherein the post-processing comprises one or more of filtering, scoring, and ranking said search results.
 12. A method of obtaining related information, comprising: receiving an indication that a word or phrase is of interest; providing via an application programming interface (API) the word or phrase of interest and one or more additional words comprising a context in which the word or phrase of interest is used; and receiving in response a result comprising data determined to be related to the word or phrase of interest as used in context.
 13. The method of claim 12, wherein the API is associated with an application framework.
 14. A system, comprising: a display device configured to display a content data; and a processor configured to: receive an indication that a word or phrase comprising the displayed content data is of interest; and use a contextual meta-information associated with the word or phrase of interest as used in context to make available information related to the word or phrase of interest.
 15. The system of claim 13, wherein the contextual meta-information comprises a part of speech or other metadata tag associated with the word or phrase.
 16. The system of claim 13, wherein the processor is configured to generate the contextual meta-information.
 17. The system of claim 13, wherein the indication that the word or phrase is of interest comprises an indication that the word or phrase has been selected electronically in the context of the content data as displayed.
 18. The system of claim 13, wherein the processor is configured to use the contextual meta-information to form a query specific to the word or phrase as used in context.
 19. The system of claim 13, wherein the processor is configured to use the contextual meta-information to post-process search results received in response to a query associated with the word or phrase of interest.
 20. A computer program product for making related information available, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for: receiving an indication that a word or phrase is of interest; using a contextual meta-information associated with the word or phrase of interest as used in context to make available information related to the word or phrase of interest. 